package com.UnionPayCenter.operation.controller;

import com.UnionPayCenter.entity.ResponseWrapper;
import com.UnionPayCenter.jwt.CurrentManager;
import com.UnionPayCenter.operation.entity.ActivityType;
import com.UnionPayCenter.operation.manager.ActivityTypeManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 活动类型
 */
@Slf4j
@Api(value = "运营活动类型")
@CurrentManager
@RestController
@RequestMapping("/operation/activity/type")
public class ActivityTypeController {

    @Autowired
    private ActivityTypeManager activityTypeManager;

    @RequestMapping(value = "getAll", method = RequestMethod.POST)
    @ApiOperation(httpMethod = "POST", value = "[后台]获取运营活动类型", response = ActivityType.class)
    public ResponseWrapper getAllActivityType() {
        return ResponseWrapper.succeed(activityTypeManager.getAll());
    }
}
